import sequelize from '../config/sequelize';
import Sequelize from 'sequelize';
const DiarysModel = sequelize.define(
  'Diarys',
  {
    //   id
    id: {
      allowNull: false,
      autoIncrement: true,
      primaryKey: true,
      type: Sequelize.INTEGER,
    },
    // 内容
    diaryContent: {
      type: Sequelize.STRING(800),
      allowNull: false,
    },
    // 创建时间
    createTime: {
      allowNull: false,
      type: Sequelize.DATE,
    },
    // 状态分数
    score: {
      type: Sequelize.INTEGER,
      allowNull: false,
    },
    // 是否锁定
    isLock: {
      type: Sequelize.BOOLEAN,
    },
  },
  {
    tableName: 'Diarys',
  },
);
export default DiarysModel;
